package com.xyoto.community.enums;

/**
 * Author: 廖振辉
 * Date: 2021/11/17
 * Description: 金句异常枚举类
 */
public enum ProverbEnum implements Code{

    ADD_ERROR(4050,"新增金句到数据库错误"),
    DELETE_ERROR(4051,"从数据库删除每日金句错误"),
    PROVERB_IS_NULL(4052,"不存在的金句id"),
    ;

    private int code;
    private String msg;

    /**
     * 全参构造器
     *
     * @param code 枚举状态码
     * @param msg 枚举状态值
     */
    ProverbEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
